﻿@{
    ViewBag.Title = "Create";
    Layout = "~/Areas/Admin/Views/Shared/_LayoutAdmin.cshtml";
}

@section head{
    <script src="@Url.Content("~/js/kindeditor/kindeditor.js")" type="text/javascript"></script>
    <script type="text/javascript">
            var editor;
            var editor1;
            KindEditor.ready(function (K) {
                editor = K.create('#Description', {
                    uploadJson: '@Url.Action("UploadImage","Upload",new { id="Product" })',
                    fileManagerJson: '@Url.Action("UploadFile","Upload")',
                    allowFileManager: true
                });
                editor1 = K.create('#ENDescription', {
                    uploadJson: '@Url.Action("UploadImage","Upload",new { id="news" })',
                    fileManagerJson: '@Url.Action("UploadFile","Upload")',
                    allowFileManager: true
                });
            });
    </script>
}

    <div class="mytopmodel" >
        新增模块：&nbsp;&nbsp;
    </div>

    <form method="post" id="myform" name="myform" action="@Url.Action("Create")">
        <div class="maindiv">
            <table cellspacing="1" id="editTable" cellpadding="3" style=" ">
                


                <tr>
                    <td class="text">分类：</td>
                    <td class="control">
                        <select name="CategoriesID" validate="required:true">
			                <option value="">选择栏目</option>
                            
                            @{
                                foreach (var c in ViewBag.Categories)
                                {
                                    <option value="@c.ID">
                                    
                                    @{
                                    string str = "├";
                                    int len = @c.Code.ToString().Trim().Split('-').Length;
                                    if (len > 3)
                                    {
                
                                        for (int i = 0; i < len - 3; i++)
                                        {
                                            str += "—".Trim();
                                        }
                                        }
  
                                    }
                                    @str@c.Name
                                    </option>
                                }
                             }
                        </select>                    
                    </td>
                    <td rowspan="4" class="controlimg">
                            <input name="ImageUrl" id="ImageUrl" type="hidden" />
                            <a href="javascript:swfupload('@Url.Action("Index", "Upload")','img','ImageUrl','Product')"><img id="img" width="150" height="150" /></a>
                        
                    </td>
                </tr>
                

                <tr>
                    <td class="text">编号：</td>
                    <td class="control"><input type="text" name="PNumber" ></input> </td>
                </tr>
                
                <tr>
                    <td class="text">名称：</td>
                    <td class="control"><input type="text" name="Name" ></input> </td>
                </tr>

                 <tr>
                    <td class="text">英文名称：</td>
                    <td class="control"><input type="text" name="ENName" ></input> </td>
                </tr>
                
             
                <tr>
                    <td class="text" >内容：</td>
                    <td colspan="2" class="control">
                        
                        <textarea name="Description" id="Description" cols="80" rows="20" class="webtextarea"></textarea>                    </td>
                </tr>

                 <tr>
                    <td class="text" >内容：</td>
                    <td colspan="2" class="control">
                        
                        <textarea name="ENDescription" id="ENDescription" cols="80" rows="20" class="webtextarea"></textarea>                    </td>
                </tr>
                
                 <tr>
                    <td class="text" >状态：</td>
                    <td colspan="2" class="control">
                    
                        <select name="Status">
                        <option value="True">显示</option>
                        <option value="False">隐藏</option>
                        </select>                    </td>
                </tr>
                

                
               <tr>
                    <td class="text" ></td>
                    <td colspan="2" class="control">
                       <input name="imgpath" id="imgpath" type="hidden" value="" />
                       <div class="impBtn hMargin fLeft shadow" ><input type="submit" value="提交" onclick="" class="save imgButton"></div>
                       <div class="impBtn hMargin fLeft shadow" ><input type="reset" value="清空" onclick="" class="reset imgButton"></div>
                       
                       <a href="javascript:history.back(-1)" >[&nbsp;返回&nbsp;] </a>                   </td>
                </tr>
            </table>
            
         
        </div>
        </form>